import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'highLight'
})
export class HighLightPipe implements PipeTransform {
    transform(value: string, inputValue: string): any {
        inputValue = inputValue.toUpperCase();
        
        if (value) {
            if (inputValue) {
                return value.replace(inputValue, '<span class="label-highlight">' + inputValue + '</span>');
            } else {
                return value;
            }
        }
    }
}